import  axios from "../../axios.js"

export default{
  //查询所有
  listDepartment(data,binding)
  {
    return axios({
      url:'/department-entity/listDepartment',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  // 机构管理接口
  // 获取列表页不带分页
  getAllRolePermissionsApi(data,binding){
    return axios({
      url:'/authority-entity/listPageAuthority',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
// 机构管理/////////////
  getMechanismListApi(data,binding,pageNum,pageSize){
    return axios({
      url:'/department-entity/listPageDepartment?'+'pageNum='+pageNum+'&'+'pageSize='+pageSize,
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  // 新增机构
  addMechanismListApi(data,binding){
    return axios({
      url:'/department-entity/saveDepartment',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  // 修改机构
  updateMechanismListApi(data,binding){
    return axios({
      url:'/department-entity/updateById',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  // 删除机构(单个)
  delMechanismListApi(data,binding){
    return axios({
      url:'/department-entity/removeById',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  // 根据条件查询所有，树结构
  listBathDepartment(data,binding){
    return axios({
      url:'/department-entity/listBathDepartment?',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  // 是否禁用
  departIsblank(data,binding){
    return axios({
      url:'/department-entity/departIsblank',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  //机构联动数据/department-entity/departmentIsBlank
  departmentIsBlank(data,binding){
    return axios({
      url:'/department-entity/departmentIsBlank',
      method:'get',
      params:data,
      headers:{
        "binding": binding
      }
    })
  },
  // //获取上级部门
  // getParentDepart(data,binding){
  //   return axios({
  //     url:'/department-entity/departmentIsBlank',
  //     method:'get',
  //     params:data,
  //     headers:{
  //       "binding": binding
  //     }
  //   })
  // },
};
